﻿<UserControl 
             x:Class="NMortgage.UI.Views.FeeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:cal="http://www.caliburnproject.org"
             xmlns:model="clr-namespace:NMortgage.UI.Model"
             xmlns:converters="clr-namespace:NMortgage.UI.Converters"
             xmlns:Properties="clr-namespace:NMortgage.UI.Properties"
             xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" 
            mc:Ignorable="d" 
             d:DesignHeight="200" d:DesignWidth="325">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Themes/CommonStyles.xaml" />
                <ResourceDictionary Source="../Themes/LoanProfileStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Border Style="{StaticResource PopupStyle}">
        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
            <StackPanel Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ScrollViewer}}, Path=ActualWidth}">
                <WrapPanel Orientation="Horizontal">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{x:Static Properties:Resources.FeeAmount}"  
                                  Style="{StaticResource FlowLabelStyle}"/>
                        <extToolkit:DecimalUpDown  x:Name="Amount" Style="{DynamicResource ValidatingDecimalBox}"
                                  Text="{Binding Path=Fee.Amount, Mode=TwoWay,ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}" 
                                  ToolTip="{x:Static Properties:Resources.FeeAmount}" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{x:Static Properties:Resources.FeeViewDurationLabel}"  
                                  Style="{StaticResource FlowLabelStyle}"/>
                        <extToolkit:IntegerUpDown x:Name="Years" Style="{DynamicResource ValidatingIntBox}"
                                  Text="{Binding Path=Fee.Years, Mode=TwoWay,ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}" 
                                  ToolTip="{x:Static Properties:Resources.DurationYearsTip}" />
                        <extToolkit:IntegerUpDown x:Name="Months" Style="{DynamicResource ValidatingIntBox}"
                                  Text="{Binding Path=Fee.Months, Mode=TwoWay,ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}" 
                                  ToolTip="{x:Static Properties:Resources.DurationMonthsTip}" />
                    </StackPanel>
                </WrapPanel>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="Finish" Content="OK" Style="{StaticResource DialogOKCancelButton}" />
                    <Button x:Name="Cancel" Content="Cancel" Style="{StaticResource DialogOKCancelButton}" />
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
    </Border>
</UserControl>
